package day3.p4;

public class Number {
	private int a, b, result;

	public Number() {
	}

	public Number(int a, int b) {
		this.a = a;
		this.b = b;
		this.result = 0;
	}

	public void add() {
		result = a + b;
	}

	public void sub() {
		result = a - b;
	}

	public void mul() {
		result = a * b;
	}

	public void div() {
		try {
			result = a / b;
		} catch (ArithmeticException e) {
			System.out.println(e.toString());
		}
	}

	public void display() {
		System.out.println("result " + result);
	}
}
